#!/bin/bash

find files/usr/share/cinnamon -name "*.ui" -exec intltool-extract --type=gettext/glade {} \;

xgettext --language=C --keyword=_ --keyword=N_ --output=cinnamon.pot src/*.c src/*/*.c

find files/usr/share/cinnamon -name "*.ui.h" -exec xgettext --language=C --keyword=_ --keyword=N_ --output=cinnamon.pot --join-existing {} \;

xgettext -cTranslators --language=JavaScript --keyword=_ --keyword=N_ --output=cinnamon.pot --join-existing --from-code=UTF-8 js/*/*.js files/usr/share/cinnamon/*/*/*.js
xgettext -c --language=Python --keyword=_ --output=cinnamon.pot --join-existing generate_additional_files.py files/usr/share/cinnamon/*/*.py files/usr/share/cinnamon/*/*/*.py files/usr/bin/*
files/usr/bin/cinnamon-xlet-makepot -j -p -m -o cinnamon.pot files/usr/share/cinnamon/applets/
files/usr/bin/cinnamon-xlet-makepot -j -p -m -o cinnamon.pot files/usr/share/cinnamon/desklets/

find files/usr/share/cinnamon -name "*.ui.h" -exec rm -f {} \;
